
Ext.BLANK_IMAGE_URL = '/extjs/resources/images/default/s.gif'; 

//var	Debug	= true;

Ext.form.Action.Submit.prototype.handleResponse = function(response){
	
        if(this.form.errorReader){
            var rs = this.form.errorReader.read(response);
            var errors = [];
            if(rs.records){
                for(var i = 0, len = rs.records.length; i < len; i++) {
                    var r = rs.records[i];
                    errors[i] = r.data;
                }
            }
            if(errors.length < 1){
                errors = null;
            }
            return {
                success : rs.success,
                errors : errors
            };
        }
	try{
		var obj	= Ext.decode(response.responseText);
	}catch(e){
		alert("Form response: =========> \n" + response.responseText)
		var obj	= {success:false}
	}
        return obj;
}

var msg	= function(o){
	if( typeof o !='object' ){
		return alert(o)
	}
	try{
		alert(Ext.encode(o))
	}catch(e){
		alert('global.meg :' + e.message)
	}
}


var regMoney	= /^\d+$|^\d+\.\d{1,2}$|^\.\d{1,2}$/i;
var regPercent	= /^\d{1,2}(\.\d{1,4})?$|^100$/i;
